(function() {
    angular.module('app').factory('tableTopBrandService', tableTopBrandService);

    tableTopBrandService.$inject = ['util', '$q'];

    function tableTopBrandService(util, $q) {
        return {
            get: _get,
            
        }

        function _get(catName) {

            var defer = $q.defer();

            util.$get({
                url: '/marketconditions/statistic/getCategoryStatisticTopBrand.htm',
                data: {
                    catName: catName,
                    type: 'm'
                }
            }).then(function(resp) {
                defer.resolve(resp.value);
            }, function(err) {
                defer.reject();
            });

            return defer.promise;
        }

        
    }
})();
